import { createRequest } from '/@/api/service';
const module = 'ib/equipment/v1/AssetDetailApi/';

/**
 * @function 巡检记录查询
 * @param data
 * @param header
 * @returns
 */
function INSPECTION_RECORD_LIST_QUERY(
  data: AssetDetailApi.InspectionRecordListQueryReq,
  header: object = {},
): Promise<AssetDetailApi.InspectionRecordListQueryResp> {
  return createRequest(
    `${process.env.APP_API_URL}${module}queryInspectionRecordList`,
    data,
    header,
    'POST',
  );
}

/**
 * @function 保养记录查询
 * @param data
 * @param header
 * @returns
 */
function MAINTENANCE_RECORD_LIST_QUERY(
  data: AssetDetailApi.MaintenanceRecordListQueryReq,
  header: object = {},
): Promise<AssetDetailApi.MaintenanceRecordListQueryResp> {
  return createRequest(
    `${process.env.APP_API_URL}${module}queryMaintenanceRecordList`,
    data,
    header,
    'POST',
  );
}

export { INSPECTION_RECORD_LIST_QUERY, MAINTENANCE_RECORD_LIST_QUERY };
